import request from '@/utils/request'

export function login(data) {
  return request({
    method: 'post',
    url: '/auth/local',
    data
  })
}

export function getInfo() {
  return request({
    method: 'get',
    url: '/users/me'
  })
}

export function getUserPerm() {
  return request({
    method: 'get',
    url: '/mypermissions'
  })
}

// 注册接口
export function register(data) {
  return request({
    method: 'post',
    url: '/auth/local/register',
    data
  })
}

